package co.edu.unal.scrum.server.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import co.edu.unal.scrum.shared.model.ProjectStatus;

import com.google.code.twig.annotation.Child;
import com.google.code.twig.annotation.Id;

@SuppressWarnings("serial")
public class Project implements java.io.Serializable {
	@Id
	private int id;
	private String name;
	private String description;
	private Date startDate;
	private Date endDate;
	private ProjectStatus state = ProjectStatus.NEW;
	@Child
	private Set<SprintBacklog> sprintBacklogs = new HashSet<SprintBacklog>(0);
	@Child
	private Set<ProductBacklog> productBacklogs = new HashSet<ProductBacklog>(0);

	public Project() {
	}

	public Project(int id, String name, String description, Date startDate,
			Date endDate, Set<SprintBacklog> sprintBacklogs,
			Set<ProductBacklog> productBacklogs) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.startDate = startDate;
		this.endDate = endDate;
		this.sprintBacklogs = sprintBacklogs;
		this.productBacklogs = productBacklogs;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public ProjectStatus getState() {
		return state;
	}

	public void setState(ProjectStatus state) {
		this.state = state;
	}

	public Set<SprintBacklog> getSprintBacklogs() {
		return sprintBacklogs;
	}

	public void setSprintBacklogs(Set<SprintBacklog> sprintBacklogs) {
		this.sprintBacklogs = sprintBacklogs;
	}

	public Set<ProductBacklog> getProductBacklogs() {
		return productBacklogs;
	}

	public void setProductBacklogs(Set<ProductBacklog> productBacklogs) {
		this.productBacklogs = productBacklogs;
	}

	

}
